package com.erps.dao;

import java.lang.reflect.Field;

import com.erps.CommonUtils.JActiveTable;
import com.hmkj.entity.ErspAchievement;

public class ErspAchievementDao extends JActiveTable {
	public ErspAchievementDao() {
		ErspAchievement obj = new ErspAchievement();
		try {
			Class<? extends Object> c = obj.getClass();
			// 获取所有的字段
			Field[] fields = c.getDeclaredFields();
			StringBuffer sbField = new StringBuffer();

			int fieldLength = fields.length;
			for (int i = 0; i < fieldLength; i++) {
				fields[i].setAccessible(true);
				sbField.append(fields[i].getName().toLowerCase() + ',');
				if (fields[i].get(obj) != null)
					this.addFieldValue(fields[i].getName().toLowerCase(),
							fields[i].get(obj).toString());
				else
					this.addFieldValue(fields[i].getName().toLowerCase(), "");
			}

		} catch (Exception ex) {

		}
	}
}
